package com.itheima.service;

import com.itheima.common.R;
import com.itheima.pojo.TbAssignRecord;
import com.itheima.pojo.TbBusinessTrackRecord;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * 商机跟进记录(TbBusinessTrackRecord)表服务接口
 *
 * @author makejava
 * @since 2022-01-16 15:48:53
 */
public interface TbBusinessTrackRecordService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    TbBusinessTrackRecord queryById(Long id);

    /**
     * 分页查询
     *
     * @param tbBusinessTrackRecord 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<TbBusinessTrackRecord> queryByPage(TbBusinessTrackRecord tbBusinessTrackRecord, PageRequest pageRequest);

    /**
     * 新增数据
     *
     * @param tbBusinessTrackRecord 实例对象
     * @return 实例对象
     */
    TbBusinessTrackRecord insert(TbBusinessTrackRecord tbBusinessTrackRecord);

    /**
     * 修改数据
     *
     * @param tbBusinessTrackRecord 实例对象
     * @return 实例对象
     */
    TbBusinessTrackRecord update(TbBusinessTrackRecord tbBusinessTrackRecord);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Long id);

    R getByBusinessId(String businessId);

    R add(TbBusinessTrackRecord tbBusinessTrackRecord);


}
